#!/bin/bash

#Usage:
#   ./addLineNumber.sh test.txt

sed '=' $1 | sed 'N; s/\n/ /'
echo
echo "  There is another ways to add line number,maybe you should know:"
echo "      n1 test.txt"
echo "      cat -n test.txt"
